//
//  JJTypeZhanglaCell.m
//  Estate
//
//  Created by houzhen on 2017/11/11.
//  Copyright © 2017年 ttsx. All rights reserved.
//

#import "JJTypeZhanglaCell.h"

@implementation JJTypeZhanglaCell
- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle=UITableViewCellSelectionStyleNone;
    self.titleLabel.font = [UIFont systemFontOfSize:16*BIZ];
    self.singleTypeBtn.titleLabel.font = [UIFont systemFontOfSize:16*BIZ];
    self.doubleTypeBtn.titleLabel.font = [UIFont systemFontOfSize:16*BIZ];

    self.titleLabel.textColor = UIColorFromRGB(0x797979);
    [self.singleTypeBtn setTitleColor:UIColorFromRGB(0x797979) forState:UIControlStateNormal];
    [self.doubleTypeBtn setTitleColor:UIColorFromRGB(0x797979) forState:UIControlStateNormal];
    self.singleTypeBtn.titleLabel.font = [UIFont systemFontOfSize:16*BIZ];
}

- (IBAction)singleTypeAction:(UIButton *)sender {
    if(!self.isEdit){
        return;
    }
    self.singleTypeBtn.selected = !self.singleTypeBtn.selected;
    self.doubleTypeBtn.selected = !self.singleTypeBtn.selected;
    if(self.IsSingleBlock){
        self.IsSingleBlock(self.singleTypeBtn.selected);
    }
}
- (IBAction)doubleTypeBtn:(UIButton *)sender {
    if(!self.isEdit){
        return;
    }
    self.doubleTypeBtn.selected = !self.doubleTypeBtn.selected;
    self.singleTypeBtn.selected = !self.doubleTypeBtn.selected;
    if(self.IsSingleBlock){
        self.IsSingleBlock(self.singleTypeBtn.selected);
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
